package com.maxd.modules.coupon.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Auther: Laban:yubo_010@163.com
 * @Date: 2020/11/12 14:58
 * @Description:
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(name = "sqx_coupon_card")
@ApiModel(value = "sqx_coupon_card对象", description = "卡券管理实体类")
public class CouponCard implements Serializable {

    @Id()
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    /**主键ID*/
    private Long id;

    @Column(name = "create_time")
    /**创建时间*/
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date createTime;

    @Column(name = "card_id")
    /**卡券ID*/
    private String cardId;

    @Column(name = "card_name")
    /**卡券名称*/
    private String cardName;

    @Column(name = "card_no")
    /**卡券卡号*/
    private String cardNo;

    @Column(name = "card_qrcode")
    /**卡券二维码*/
    private String cardQrcode;

    @Column(name = "card_money")
    /**卡券金额 单位 分*/
    private String cardMoney;

    @Column(name = "card_type")
    /**卡券类型(1:用户 2:商户)*/
    private String cardType;

    @Column(name = "card_is_activation")
    /**是否被激活/兑换/使用(0:未使用 1:已使用)*/
    private String cardIsActivation;

    @Column(name = "card_user_id")
    /**绑定用户id，默认为空,当有值时，card_is_activation等于1*/
    private String cardUserId;

    /**卡券兑换时间*/
    @Column(name = "exchange_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date exchangeTime;



}
